package cn.springcloud.fix.demo.java8;

import java.util.function.BiFunction;

public class Xttblog {

    private String name;
    private String sayStr;

    public static void main(String[] args) {
        Xttblog xttblog = new Xttblog();
        xttblog.setName("业余草");
        BiFunction<Xttblog, String, String> function = Xttblog::say;
        String str = function.apply(xttblog, "hello～");
        System.out.println(str);
    }

    private String say(String sayStr) {
        this.sayStr = sayStr;
        return this.name + " say : " + this.sayStr;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSayStr() {
        return sayStr;
    }

    public void setSayStr(String sayStr) {
        this.sayStr = sayStr;
    }
}
